package com.spi.soconversion.base.definition;

import com.spi.soconversion.util.SOCConstants;
import com.spi.soconversion.util.SOCUtility;
import com.spi.soconversion.util.XMLAttributeConstants;
import com.spi.soconversion.util.XMLTagConstants;

public class SOCOrderPriceInfo {
	
	private static final String currency =SOCConstants.CURRENCY;
	private static final String enterpriseCurrency = SOCConstants.EMPTY_STRING;
	private static final String headerTax = SOCConstants.ZERO;
	private String totalAmt;
	private static final String retAmt =  SOCConstants.ZERO;

	public String getCurrency() {
		return currency;
	}

	public String getEnterpriseCurrency() {
		return enterpriseCurrency;
	}

	public String getHeaderTax() {
		return headerTax;
	}

	public String getRetAmt() {
		return retAmt;
	}

	public void setTotalAmt(String totalAmt) {
		this.totalAmt = totalAmt;
	}

	public String getTotalAmt() {
		return totalAmt;
	}
	
	@Override
	public String toString() {
		StringBuilder sb = new StringBuilder();

		sb.append(XMLTagConstants.START_TAG_PRICE_INFO);
		sb.append(SOCConstants.BLANK_STRING);
		
		sb.append(SOCUtility.getAttribute(XMLAttributeConstants.CURRENCY,getCurrency()));
		sb.append(SOCConstants.BLANK_STRING);
		
		sb.append(SOCUtility.getAttribute(XMLAttributeConstants.ENTERPRISE_CURRENCY, getEnterpriseCurrency()));
		sb.append(SOCConstants.BLANK_STRING);
		
		sb.append(SOCUtility.getAttribute(XMLAttributeConstants.HEADER_TAX, getHeaderTax()));
		sb.append(SOCConstants.BLANK_STRING);
		
		sb.append(SOCUtility.getAttribute(XMLAttributeConstants.RETURNED_AMT, getRetAmt()));
		sb.append(SOCConstants.BLANK_STRING);
		
		sb.append(SOCUtility.getAttribute(XMLAttributeConstants.TOTAL_AMT, getTotalAmt()));
		sb.append(SOCConstants.BLANK_STRING);

		sb.append(SOCConstants.CLOSING_XML_TAG);
		sb.append(SOCConstants.NEW_LINE);

		sb.append(XMLTagConstants.END_TAG_PRICE_INFO);

		return sb.toString();
	}
}
